Skip to content

App name: the names in the code and on the disk read from the values - #1905

Open
vmillet-dev wants to merge 1 commit into
app-name-valuesfrom
app-name-code
Open

vmillet-dev wants to merge 1 commit into
app-name-valuesfrom
app-name-code

Conversation

@vmillet-dev

Copy link
Copy Markdown
Owner

Part of #1896: steps 2, 3 and 4. The last pull request of the ticket closes it.

Stacked on #1904 (the values and their reader): its base is app-name-values, so this diff is these steps alone. Merge #1898, #1900, #1901, #1902, #1903, #1904 in that order; this pull request then targets dev/1.3.3.

With today's values nothing changes for an installed copy: every name below is spelled as before, now read from brand.

Step 2, the shown name

  • USER_AGENT is built from the display name, and is_default recognises that prefix and no other.
  • The GNOME custom shortcut's name reads it too.
  • The engine's error details (« unknown to this version of DevNotes ») drop the name rather than read it. They go to the log alone, never to the screen, and the version already says which copy wrote them.

Step 3, the names written on disk or in a file

  • The profile folder (platform::paths::DEFAULT_PROFILE) is brand::IDENTIFIER.
  • The library's file and its sidecars are {slug}.sqlite3. layout.rs's test spells the slug and the suffix, so the shape stays held.
  • Preference keys. The code now names a key without its prefix ("notes.activeSpace"), and Preferences puts the slug before it. That removes 75 typed devnotes. prefixes.
  • The drawing address in a Note (richtext::picture::DRAWING_SOURCE) is {slug}:drawing/. golden/markdown/cases.json names it {{drawing}}, which the golden test fills in.
  • The export's proposed file name is {slug}-<stamp>.{extension}, and the import filter offers {extension} beside json.

Step 4, the names the system sees, all from the slug:

  • the instance's socket and the autostart entry;
  • the GNOME shortcut prefix and the portal's identifiers (Register, the session and request tokens);
  • the tray's id and the shortcuts' fallback executable;
  • with_app_id, the log file's basename and the devnotes: prefix of the terminal messages.

Also here, because a translation spelled a name

  • The sample notes' tag is the slug. Its tags.devnotes key leaves both locales.
  • The GNOME note in the shortcut preferences takes {{binary}}.
  • The offline documentation's link to the site is built from site.

The updater's endpoint was already built from Cargo's repository in #1904.

Left for the next pull requests: test fixtures and comments that still spell the name, DevNotesApp, the literal Cargo names and their test (steps 5, 6 and 9); the packages and the CI (step 7); the documentation and the site (step 8). The throwaway sweep and the rename rehearsal will be pasted in the last one, once nothing is left for them to find.

Wiki. The overview's section « The application's names » says each value is also a macro (brand::slug!()) for a constant built with concat!. « Preferences, settings and the notifiers » says the code names a key without its prefix.

Checks run (Linux)

  • cargo fmt --all --check, cargo clippy --workspace --all-targets --all-features -- -D warnings.
  • cargo test --workspace --exclude e2e --no-fail-fast: every crate green.
  • node scripts/architecture-links.mjs.
  • E2E (--features e2e, Xvfb + openbox): 01_first_day, 07_reaching_from_anywhere, 11_libraries_and_transfer and 13_making_it_mine pass. The terminal stays quiet: no log line, only the journey's steps. These are the ticket's « first launch », « library transfer », « preferences on disk », « libraries » and « documentation », under the journeys' current names.

Generated by Claude Code

The shown name, the request header, the names written on disk or in a
file, and the names the system sees are read from `brand`:

- `USER_AGENT` and `is_default` from the display name; the GNOME
  shortcut's name too.
- The profile folder from the identifier; the library file, the
  preference keys (`Preferences` puts the slug before a key the code
  names without it), the drawing address in a Note, the export's file
  name and the import's filter from the slug and the extension.
- The instance's socket, the autostart entry, the GNOME prefix, the
  portal's identifiers, the tray's and the shortcuts' fallbacks, the
  window's app id, the log file and the terminal messages from the slug.
- The sample notes' tag, the documentation's address and the GNOME note
  of the preferences read the values instead of a translation's word.

The engine's error details drop the name rather than read it: they go
to the log alone. Today's values are unchanged, so an installed copy
finds everything where it was; `layout.rs`'s test spells the slug and
the suffix.

Part of #1896 (steps 2, 3, 4)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BbVs5tCyTr9AasGra3Zzg3

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Restructuring without behaviour change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants